import cpp

class RawMessageFieldAccess extends FieldAccess {
    RawMessageFieldAccess() {
        this.getTarget().getName() = "pszRawMsg"
    }
}

class RawMsgAccessFunction extends Function {
    RawMsgAccessFunction() {
        any(RawMessageFieldAccess access).getEnclosingFunction() = this
    }
}

from RawMsgAccessFunction access
select access.getFile(), access